package com.tablefood.action;

import java.util.List;

import javax.annotation.Resource;

import com.tablefood.domain.ShopOrderDetail;
import com.tablefood.service.OrderDetailService;

public class OrderDetailAction {
	@Resource
	private OrderDetailService orderDetailService;
	
	private String orderid;                     //订单id
	private List<ShopOrderDetail> orderDetails; //订单列表
	
	
	/************************setter,getter*********************************/
	public String getOrderid() {
		return orderid;
	}

	public void setOrderid(String orderid) {
		this.orderid = orderid;
	}

	public List<ShopOrderDetail> getOrderDetails() {
		return orderDetails;
	}

	public void setOrderDetails(List<ShopOrderDetail> orderDetails) {
		this.orderDetails = orderDetails;
	}
	
/************************setter,getter结束*********************************/
	public String ShowOrderDetail(){
		orderDetails=orderDetailService.searchAllOrderDetail(orderid);
		if(null==orderDetails||orderDetails.size()==0){
			orderDetails=null;
			System.out.println("订单详情为空");
			return "empty";
		}
		return "detail";
	}
	

}
